package com.kfm.coll;

import com.kfm.ex.Person;

public class Demo {

    // 数组 数据类型[] 变量名;
    public static void main(String[] args) {
        int[] arr = new int[4]; // 数组长度为4  下标 0-3
        char[] chars = new char[4];
        System.out.println(chars[0]); // ' '
        String[] str = new String[4];
        System.out.println(str[0]); // null
        Person[] people = new Person[4];
        System.out.println(people[0]); // null
        // arr[0] = 1;
        // arr[1] = 2;
        // arr[2] = 3;
        // arr[3] = 4;
        int[] arr2 = {1, 2, 3, 4, 5, 6};
        int[] arr3 = new int[]{1, 3, 5, 6, 7};
        // 长度一旦给定就不可变，扩容


        MyList myList = new MyList();
        myList.add(0);
        myList.add(0);
        myList.add(0);
        myList.add(0);
        myList.add(0);
        myList.add(0);
        myList.add(0);
        myList.add(0);
        myList.add(0);
        myList.add(0);
        myList.add(0);
        myList.get(0);

    }
}
